/**
 * 
 */
package net.sf.cldsql.dj.mvc;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;


/**
 * DiRoute
 */
public class DiRoute {
    private String service;
    private String method;
    private Object[] serviceArgs;

    public DiRoute(String service, String method, Object[] serviceArgs) {
        this.service = service;
        this.method = method;
        this.serviceArgs = serviceArgs;
    }

    /** @return method */
    public String getMethod() {
        return method;
    }

    /** @param method method to be set */
    public void setMethod(String method) {
        this.method = method;
    }

    /** @return service */
    public String getService() {
        return service;
    }

    /** @param service service to be set */
    public void setService(String service) {
        this.service = service;
    }
    
    public String toString() {
        return new ReflectionToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
            .toString();
        //.setExcludeFieldNames(new String[] { "strValues", "items" })
        //return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }

    /** @return context */
    public Object[] getServiceArgs() {
        return serviceArgs;
    }

    /** @param context context to be set */
    public void setServiceArgs(Object[] serviceArgs) {
        this.serviceArgs = serviceArgs;
    }
}
